package cn.z2huo.knowledge.collection.map.concurrenthashmap;

import java.util.concurrent.ConcurrentHashMap;

/**
 * <p>ConcurrentHashMap 的 key 和 value 都不能为 null
 */
class NullTest {

    public static void main(String[] args) {
        ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
        map.put("name", null);
        map.put(null, "value");
        System.out.println(map);
    }
}
